package reco.db.validation;

import reco.db.Constraint;

/**
 * Creates not null constraint over fields of any kind.
 * <p>
 * It's defined as an enum to avoid serializing problems.
 */
public class NotNullConstraintFactory extends SimpleConstraintFactory implements BooleanConstraintFactory, DateConstraintFactory,
                EnumConstraintFactory, NumberConstraintFactory, StringConstraintFactory {
    public NotNullConstraintFactory() {
        super(String.class);
    }

    @Override
    public <T> Constraint<T> createConstraint() {
        return new NotNullConstraint<T>();
    }
}